<div id="main">
    <div id="contents_stat">
        <form method="post" action="#" name="filters">
            <!--<fieldset>
                <legend>
                    <label sid="tools.td5"></label>
                </legend>
                <div class="frame_tab_layer">
                    <table class="cmenutitle" width="100%" cellspacing="0" cellpadding="0" border="0">
                        <tbody>
                        <tr>
                            <td align="center" colspan="2">
                                <input class="button" type="button" name="id980" sid="tools.td5">
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </fieldset>-->
            <fieldset>
                <legend>
                    <label sid="tools.td6"></label>
                </legend>
                <div class="frame_tab_layer">
                    <table class="cmenutitle" width="100%" cellspacing="0" cellpadding="0" border="0">
                        <tbody>
                        <tr>
                            <td align="center" colspan="2">
                                <input class="button" type="button" name="id990" sid="tools.td6">
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </fieldset>
            <fieldset>
                <legend>
                    <label sid="tools.restore"></label>
                </legend>
                <div class="frame_tab_layer">
                    <table class="cmenutitle" width="100%" cellspacing="0" cellpadding="0" border="0">
                        <tbody>
                        <tr>
                            <td align="center">
                                <input class="button" type="button" name="id991" sid="tools.td11">
                                <span style="padding-left:20px;"></span>
                                <input class="button" type="button" name="id992" sid="tools.td7">
                                <span style="padding-left:20px;"></span>
                                <input class="button" type="button" name="id993" sid="tools.td12">
                            </td>
                        </tr>
                        </tbody>
                    </table>
                </div>
            </fieldset>
        </form>
    </div>
</div>
<!--<br>
<div id="helpContainer">
    <div id="help">
        <div>
            <h2>
                <label sid="share.help"></label>
            </h2>
        </div>
        <div id="helpBody">
            <dl>
                <dt class="term">
                    <label sid="equip_control.title"></label>
                </dt>
                <dd class="definition">
                    <label sid="equip_control.titleTip"></label>
                </dd>
                <dt class="term">
                    <label sid="equip_control.sp1"></label>
                </dt>
                <dd class="definition">

                    <label sid="equip_control.sp1Tip"></label>
                </dd>
                <dt class="term">
                    <label sid="equip_control.sp2"></label>
                </dt>
                <dd class="definition">

                    <label sid="equip_control.sp2Tip"></label><br><br>

                    <label sid="equip_control.sp2_1"></label><br>

                    <label sid="equip_control.sp2_1Tip"></label><br><br>

                    <label sid="equip_control.sp2_2"></label><br>

                    <label sid="equip_control.sp2_2Tip"></label><br><br>

                    <label sid="equip_control.sp2_3"></label><br>

                    <label sid="equip_control.sp2_3Tip"></label><br>
                </dd>
            </dl>
        </div>
    </div>
</div>-->
<script type="text/javascript">
function click980() {
    var software = msg.restartSoft;
    var softwareFail = msg.restartSoftFail;
    if (confirm(software)) {
        $.ajax({
            type: "POST",
            url: modules["app_reboot"] + '&tmp=' + Math.random(),
            dataType: "xml",
            error: function (xml) {
                $(xml).find('Error').each(function () {
                    var errortext = $(this).attr('msg');
                    //show_message("err",errortext);
                    alert(errortext);
                });
            },
            success: function (xml) {
                $(xml).find('rsp').each(function () {
                    var stat = $(this).attr('stat');
                    if (stat == "fail") {
                        var errorcode = $(xml).find('Error').attr('code');
                        if (errorcode == '5') gotologin();
                        else {
                            //show_message("err",softwareFail);
                            alert(softwareFail);
                        }
                    } else {
                        gotologin();
                    }
                });
            }
        });
        return true;
    } else return false;
}

function click990() {
    var resys = msg.rebootSys;
    var resysFail = msg.rebootSysFail;
    if (confirm(resys)) {
        $.ajax({
            type: "POST",
            url: modules["system_reboot"] + '&tmp=' + Math.random(),
            dataType: "xml",
            error: function (xml) {
                $(xml).find('Error').each(function () {
                    var errortext = $(this).attr('msg');
                  // show_message("err",errortext);
                  alert(errortext);
                });
            },
            success: function (xml) {
                $(xml).find('rsp').each(function () {
                    var stat = $(this).attr('stat');
                    if (stat == "fail") {
                        var errorcode = $(xml).find('Error').attr('code');
                        if (errorcode == '5') gotologin();
                        else 
                        	//show_message("err",resysFail);
                        	alert(resysFail);
                    } else gotologin();
                });
            }
        });
        return true;
    } else return false;
}

function click991() {
    var clearCfg = msg.clearCfg;
    if (confirm(clearCfg)) {
    	$.ajax({
		type:"POST",url:"status?get&param=WROC_ResetNET",dataType:"text",error:function (xml) {
			$(xml).find('Error').each(function () {
				var errortext = $(this).attr('msg');
				//show_message("err",errortext);
				alert(errortext);
			});
		},success:function (xml) {
			var stat = $.trim(xml);
				if(stat == "success") {
						//show_message("success",msg.clearReboot );
						alert(msg.clearReboot );
				}else if(stat == "fail") {
					var errorcode = $(xml).find('Error').attr('code');
                        if (errorcode == '5') gotologin();
                        else 
                        	//show_message("err",msg.clearFail);
                        	alert(msg.clearFail);
				}
		}
	});
        return true;
    } else return false;
}

function click992() {
    var clearCfg = msg.clearCfg;
    if (confirm(clearCfg)) {
    	$.ajax({
		type:"POST",url:"status?get&param=WROC_ResetVOIP",dataType:"text",error:function (xml) {
			$(xml).find('Error').each(function () {
				var errortext = $(this).attr('msg');
				//show_message("err",errortext);
				alert(errortext);
			});
		},success:function (xml) {
			var stat = $.trim(xml);
				if(stat == "success") {
						//show_message("success",msg.clearReboot );
						alert(msg.clearReboot);
				}else if(stat == "fail") {
					var errorcode = $(xml).find('Error').attr('code');
                        if (errorcode == '5') gotologin();
                        else 
                        	//show_message("err",msg.clearFail);
                        	alert(msg.clearFail);
				}
		}
	});
        return true;
    } else return false;
}

function click993() {
    var clearCfg = msg.clearCfg;
    if (confirm(clearCfg)) {
    	$.ajax({
		type:"POST",url:"status?get&param=WROC_ResetALL",dataType:"text",error:function (xml) {
			$(xml).find('Error').each(function () {
				var errortext = $(this).attr('msg');
				//show_message("err",errortext);
				alert(errortext);
			});
		},success:function (xml) {
			var stat = $.trim(xml);
				if(stat == "success") {
						//show_message("success",msg.clearReboot );
						alert(msg.clearReboot);
				}else if(stat == "fail") {
					var errorcode = $(xml).find('Error').attr('code');
                        if (errorcode == '5') gotologin();
                        else
                        	alert(msg.clearFail);
                        	//show_message("err",msg.clearFail);
				}
		}
	});
        return true;
    } else return false;
}
$(document).ready(function(){

    $("[name=id980]").click(function () {
        click980();
    });

    $("[name=id990]").click(function () {
        click990();
    });

    $("[name=id991]").click(function () {
        click991();
    });
    $("[name=id992]").click(function () {
        click992();
    });
    $("[name=id993]").click(function () {
        click993();
    });
});

</script>

